package com.yearno.common.utils

object RegexUtil {

    private const val REG_LOGIN_PWD = "^(?=.*\\d)(?=.*[a-zA-Z])[A-Za-z0-9]{6,}\$"

    private val phoneRegex = Regex("^[1]([0-9])[0-9]{9}\$")

    fun matchesPhone(phone: String): Boolean = phoneRegex.matches(phone)

    fun loginPwd(pwd: String): Boolean {
        return REG_LOGIN_PWD.toRegex().matches(pwd)
    }
}